package com.lxh.observer.jdk;

public class Main {
    public static void main(String[] args) {

        // 定义观察者
        XiaoLi xiaoLi = new XiaoLi();
        XiaoHao xiaoHao = new XiaoHao();

        // 定义通知者
        BanZhang banZhang = new BanZhang();

        banZhang.addObserver(xiaoHao);
        banZhang.addObserver(xiaoLi);

        banZhang.sendNotify("明天放假");
        
    }
}
